package cn.chengpengper.im.platform.common.model.dto;

import com.sun.xml.internal.ws.api.model.MEP;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/*@formatter:off*/

/**
 * ____________________
 * < 神兽护体，永无bug! >
 * --------------------
 *
 * @author huchengpeng
 * @version v1.0.0
 * @date 2024/11/23 16:39
 * @description 私聊消息DTO
 */

/*@formatter:on*/

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("私聊消息DTO")
public class PrivateMessageDto implements Serializable {

    private static final long serialVersionUID = 5896309165155175992L;

    @NotNull(message = "接收用户ID不能为空")
    @ApiModelProperty(value = "接收用户ID")
    private Long receiverId;

    @Length(max = 1024, message = "内容长度不可大于1024")
    @NotEmpty(message = "发送内容不能为空")
    @ApiModelProperty(value = "发送内容")
    private String content;

    @NotNull(message = "消息类型不可为空")
    @ApiModelProperty(value = "消息类型")
    private Integer type;
}
